package com.yanmaohu.yulia.bean;

/**
 * @author Bright Lee
 */
public final class AddDomainConstraintDefinition implements AlterDomainAction {

    private int beginIndex;
    private int endIndex;
    private DomainConstraint domainConstraint;

    public AddDomainConstraintDefinition(int beginIndex, DomainConstraint domainConstraint) {
        this.beginIndex = beginIndex;
        this.endIndex = domainConstraint.getEndIndex();
        this.domainConstraint = domainConstraint;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public DomainConstraint getDomainConstraint() {
        return domainConstraint;
    }

}
